<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>	
<!DOCTYPE html>
<html>
<head>
	<title><s:property value="site.category.categoryName"/>添加页面</title>
	<link rel="stylesheet" href="../jquery/jquery.mobile-1.0a4.1.min.css" />
	<link rel="stylesheet" href="../css/site_style.css"/>
	<script type="text/javascript" src="../jquery/jquery-1.5.2.min.js"></script>
	<script type="text/javascript" src="../jqueryui/jquery-ui-1.8.11.custom.min.js"></script>
	<script type="text/javascript" src="../jquery/jquery.mobile-1.0a4.1.min.js"></script>
	<script type="text/javascript" src="../jquery/jquery.validate.js"></script>
	<script type="text/javascript"  src="site_add.js"></script>
	<script charset="utf-8" src="http://s.map.qq.com/api/js/beta/v2.1/QQMapAPI.js"></script>	
	
	<style media="screen" type="text/css">
		#map {
			width: 100%;
			height: 240px;
			}
	</style>

</head>
<body onload="init()">
<div data-role="page">

	<div id="header" data-role="header" data-theme="b">
		<s:property value="site.category.categoryName"/>添加页面
			<s:if test="#session.login_user.category!=null">
	        	<a  onclick="location='listByMemberId.action'" data-icon="back" data-iconpos="notext" data-role="button" style="margin: 2px;float: right;" >添加</a> 
			 </s:if>
	 		<s:else>
	        	<a onclick="location='list.action?site.category.categoryNo=<s:property value="site.category.categoryNo"/>'"  data-role="button" data-icon="back" data-iconpos="notext" style="float: right;"  >回退</a> 
	     	 </s:else>
	 </div><!-- /header -->

	<div data-role="content">
		<form id="site_add_form"  action="add.action" method="post" enctype="multipart/form-data" >
			<div data-role="fieldcontain">
				<label for="siteName" >名称:</label>
	        	 <input type="text" name="siteName" id="siteName"  />
	             <span id="info_name" ></span>
			</div>

			<div data-role="fieldcontain">
				<label for="siteDesc">类别描述:</label>
				<textarea cols="20" rows="8" name="siteDesc" id="siteDesc"></textarea>

			</div>
			<div data-role="fieldcontain">
	        <fieldset data-role="controlgroup">
			     	<legend>类别:</legend>
			         <select name="categoryNo" id="categoryNo"  data-native-menu="false">
			         	<s:iterator value="siteCategoryList">
			         		<s:if test='site.category.categoryNo==categoryNo'>
			         			<option value='<s:property value="categoryNo"/>' selected><s:property value="categoryName"/></option>
			         		</s:if>
			         		<s:else>
			         		 	<option value='<s:property value="categoryNo"/>'><s:property value="categoryName"/></option>
			         		 </s:else>
			         	 </s:iterator>
			         </select>
	         </fieldset>
			</div>

			
			<div data-role="fieldcontain">
				<label for="city">城市:</label>
			 	<input type="text" name="city" id="city" />
			</div>
			<div data-role="fieldcontain">
				<label for="address">地址:</label>
			 	<input type="text" name="address" id="address" />
			</div>
			<div data-role="fieldcontain">
				<label for="contactName">联系人:</label>
			 	<input type="text" name="contactName" id="contactName" />
			</div>

			<div data-role="fieldcontain">
				<label for="tel">联系电话:</label>
				<input type="text" name="tel" id="tel"/>
			</div>

			<div data-role="fieldcontain">
				<label for="fax">传真:</label>
				<input type="text" name="fax" id="fax"  />
			</div>
			
			<div data-role="fieldcontain">
				<label for="mobile">移动电话:</label>
				<input type="text" name="mobile" id="mobile"  />
			</div>
			<div data-role="fieldcontain">
				<label for="email">EMail:</label>
				<input type="text" name="email" id="email"  />
			</div>
			<div data-role="fieldcontain">
				<label for="webSite">网址:</label>
				<input type="text" name="webSite" id="webSite"  />
			</div>
			<div id="map"></div>
			<div data-role="fieldcontain">
				<label for="lng">经度:</label>
				<input type="text" name="lng" id="lng" />
				
			</div>
			<div data-role="fieldcontain">
				<label for="lat">纬度:</label>
				<input type="text" name="lat" id="lat"  />
			</div>
			
			<div data-role="fieldcontain">
				<fieldset data-role="controlgroup" data-type="horizontal">
			     <legend>图片:</legend>
				<input type="file" name="photo" id="photo"  />
				</fieldset>
			</div>
			
			<div data-role="fieldcontain">
				<fieldset data-role="controlgroup" data-type="horizontal">
			     		<legend>是否显示:</legend>
			     		<input type="radio" name="showStatus" id="showStatus_y" value="Y" />
			         	<label for="showStatus_y">是</label>
			         	<input type="radio" name="showStatus" id="showStatus_n" value="N" checked="checked" />
			         	<label for="showStatus_n">否</label>
			    </fieldset>
				
			</div>
			
			
		<div data-role="fieldcontain">
			<fieldset class="ui-grid-a">
				<div class="ui-block-a"><button type="reset" data-theme="d">取消</button></div>
				<div class="ui-block-b"><button type="submit"  data-theme="a">添加</button></div>
	   		 </fieldset>
	   
		</div> 
	</form>

	</div><!-- /content -->
</div><!-- /page -->

</body>
</html>
